package com.rizzo.analytics.domain.application;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Applications implements Serializable {

    private static final long serialVersionUID = 3L;

    private Set<String> applications;

    public Applications() {
    }

    public Applications(Set<String> applications) {
        this.applications = applications;
    }

    public Set<String> getApplications() {
        if (applications == null) {
            applications = new HashSet<String>();
        }
        return applications;
    }

    public void setApplications(Set<String> applications) {
        this.applications = applications;
    }

    @Override
    public boolean equals(Object o) {
        return EqualsBuilder.reflectionEquals(this, o);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }
}
